<template>
	<!-- 商品列表 -->
	<view class="goodsBox">
		<view class="goodsList">
			<view class="goods-wrapper">
				<view class="initNoData" v-if="goodsDataList.length == 0"></view>
				<scroll-view scroll-y="true" v-else>
					
					<!-- <liu-waterfall :dataList="goodsDataList" :column="2" @click="imageClick"></liu-waterfall> -->
				<view class="indexGoods">
				<view class="indexGoods-list">
					<view class="indexGoods-list__item" v-for="(item,index) in goodsDataList" :key="index"
					@tap.stop="$tools.jump('/pages/goods/goodsDetails',item.id)">
						<view class="imgBox">
							<image :src="item.image" mode="aspectFill"></image>
						</view>
						<view class="content">
							<view class="name">{{ item.storeName }}</view>
							<view class="operateBig">
								<view class="price"><text class="unit">￥</text> {{ item.price }}</view>
								<view class="sales" v-if="item.giveIntegral >0">赠送<text class="num">{{item.giveIntegral}}</text>积分</view>
							</view>
						</view>
					</view>
				</view>
				<!-- <goodsList :goodsDataList="goodsDataList"></goodsList> -->
			</view>	
				</scroll-view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "",
		props: {
			goodsDataList: {
				type: Array,
				default: function() {
					return []
				},
			},
			rank: {
			    type: [Number, String],
			    default: 0,
			},
			showPower: {
				type: Boolean,
				default:false,
			}
		},
		data() {
			return {
				qiniu: {},
			}
		},
		mounted() {
			// this.getQiNiuToken();
		},
		created() {
			
		},
		methods: {
			imageClick(item){
				console.log("item:",item);
				this.$tools.jump('/pages/goods/goodsDetails',item.id);
			},
			// 查询七牛云上传文件TOKEN
			getQiNiuToken() {
				var data = {};
				this.$Ajax('/userinfo/qiniu/token',data, res => {
						this.qiniu = res.data;
					}, err => {
						
					},'GET'
				);
			},
		},
	}	
</script>

<style lang="scss" scoped>
	
</style>